﻿using System;

namespace HomeWork2
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 0;
            int[] array = {3, 6, 7, 9, 12, 13, 19, 54};
            for(int i = 0; i < array.Length; i++)
            {
                if (a <= array[i])
                    a = array[i];
            }
            Console.WriteLine("数组最大值：" + a.ToString());
            for (int i = 0; i < array.Length; i++)
            {
                if (a >= array[i])
                    a = array[i];
            }
            Console.WriteLine("数组最小值：" + a.ToString());
            for(int i = 0; i < array.Length; i++)
            {
                a += array[i];
            }
            Console.WriteLine("数组平均值：" + (a / array.Length).ToString());
            for (int i = 0; i < array.Length; i++)
            {
                a += array[i];
            }
            Console.WriteLine("数组的和：" + a.ToString());
        }
    }
}
